
var echarts = null;

var mtmessage_chart = null;
var mtmessagerecv_chart = null;
var momessage_chart = null;
require.config({
    paths: {
        echarts: '/static/res/lib/echarts/'
    }
});
// 按需加载
require([
        'echarts',
        'echarts/chart/line',
        'echarts/chart/bar',
    ],
    function(ec) {
		echarts = ec;

		mtmessage_chart = draw_chart('mtmessage_chart', get_line_option('Redis实时联通情况', '', ['连接耗时'], '时间', 'ms'));
		mtmessagerecv_chart = draw_chart('mtmessagerecv_chart', get_line_option('Redis每秒处理命令数', '', ['OPS'], '命令条数', ''));
		momessage_chart = draw_chart('momessage_chart', get_line_option('Redis内存实时占用情况', '', ['Redis内存占用', '系统分配内存'], '内存占用', ' Kb'));
		//开启监控

		load_all_server_from_storage(); //加载本地数据
		fill_page(get_server_key());
		monitor_task();
    }
);